<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>任务管理系统-NetJava-v1.0</title>
		<!--  ext式样库 -->
		<link type="text/css" rel="stylesheet" href="/taskManager05/ext/resources/css/ext-all.css">

		<link rel="stylesheet" type="text/css" href="/taskManager05/css/style.css" />
		<!--  ext基础类库 -->
		<script type="text/javascript" src="/taskManager05/ext/adapter/ext/ext-base.js"></script>
		<!--  ext核心类库 -->
		<script type="text/javascript" src="/taskManager05/ext/ext-all.js"></script>
		<script type="text/javascript" src="/taskManager05/ext/source/locale/ext-lang-zh_CN.js"></script>
		<script type="text/javascript" src="/taskManager05/js/themeChange.js"></script>
		<script type="text/javascript" src="/taskManager05/js/DWRTreeLoader.js"></script>

		<script type='text/javascript' src='/taskManager05/dwr/interface/MainMenuRequest.js'></script>
  		<script type='text/javascript' src='/taskManager05/dwr/engine.js'></script>
		<script type='text/javascript' src='/taskManager05/dwr/util.js'></script>

	<script type="text/javascript">
	Ext.onReady(function(){
		Ext.BLANK_IMAGE_URL = '/taskManager05/ext/resources/images/default/s.gif';
		var root = new Ext.tree.AsyncTreeNode({
			text : '任务管理系统',
			id:'root',
			expanded : true//默认展开根节点
		});

		//异步请求数据
		var loader = new Ext.ux.DWRTreeLoader({
			dwrMethod: MainMenuRequest.getTreeNodeList
		});

		var menu = new Ext.tree.TreePanel({
			loader:loader,
			border : false,
			root : root,
			hrefTarget : 'mainContent',
			listeners : {
				click : function(node,e){
				if(null!=node.attributes.url){
					mainPanel.load({

						url:node.attributes.url,
						callback : function(){
							mainPanel.setTitle(node.text);
						},
						scripts: true
					});
					}
				}
			}
			,
			tbar : [
				'皮肤选择：',
				{
					xtype : 'themeChange',
					width : 120,
					listWidth : 120
				},
				'->'
			]
		});
		new Ext.Viewport({
			layout:'border',//表格布局
			items: [{
				collapsible: true,
				contentEl:'top-logo',
				region: 'north',//指定子面板所在区域为north
				height: 100
			},{
				title : '功能菜单',
				items : menu,
				split:true,
				collapsible: true,
				region:'west',//指定子面板所在区域为west
				width: 200
			},{
				title: '系统说明',
				contentEl : 'aboutDiv',
				collapsible: true,
				id : 'mainContent',
				region:'center'//指定子面板所在区域为center
			}]
		});
		var mainPanel = Ext.getCmp('mainContent');
	});

	</script>
  </head>

  <body>

<div id='top-logo'>
	<div id='logo'><img src="/taskManager05/images/logo.gif" /></div>
	<div id='banner'><img src="/taskManager05/images/ico_3.gif" /> 注销&nbsp; <img src="/taskManager05/images/ico_5.gif" /> 设置&nbsp; <img src="/taskManager05/images/ico_7.gif" /> 帮助&nbsp; <img src="/taskManager05/images/ico_9.gif" /> 关于 <br/><br/>
	<%
	String deptName=(String)session.getAttribute("deptName");
	if(deptName==null){
	%>
欢迎系统管理员<%=session.getAttribute("userName")%>登录本系统
<%
	}else{
%>
欢迎来自<%=session.getAttribute("deptName")%>的<%=session.getAttribute("userName")%>登录本系统
<%
	}
%>
	</div>
</div>
    <div id='aboutDiv' style='height:500;width:100%;text-align:center;line-height:300px'>
<h2>欢迎登陆任务管理系统，本系统采用Ext+DWR框架！</h2>
</div>
  </body>
</html>
